#ifndef UNITS_H
#define UNITS_H

#include <QPointF>
#include "external/RVO2/src/RVO.h"
struct Player{
    QPointF pos; // 出生点
    int team; // 队伍
    int hp; // 血量
    int attackrange; // 攻击范围
    int attackfrequency; // 攻击频率
    qint64 lastattack = 0; // 最后攻击时间
    int ap; // 攻击力
    Player(const QPointF& p, int t, int h, int ar, int af, int a)
        : pos(p), team(t), hp(h), attackrange(ar), attackfrequency(af), ap(a){}
};

struct Unit{
    int team;
    int radius;
    int speed;

    int hp;
    int ap;
    int attackrange;

//    int state = 0; // 0 move 1 attack
    qint64 lastattack = 0; // 最后攻击时间
    int attackfrequency = 1; // 攻击频率1ms,故意的

    size_t id;
    RVO::Vector2 pos;
};

#endif // UNITS_H
